package com.wolfalpha.lwtool.map;

import java.util.ArrayList;
import java.util.List;

import com.wolfalpha.lwtool.vo.FFCity;
import com.wolfalpha.lwtool.vo.FFListJob;
import com.wolfalpha.lwtool.vo.FFJobInfo;
import com.wolfalpha.lwtool.vo.JobTemp;

/**
 * 共享数据
 * @author ttStudio
 *
 */
public class MapsAndLists {
	
	private static List<FFListJob> jobs = new ArrayList<FFListJob>();
	private static List<FFJobInfo> jobInfos = new ArrayList<FFJobInfo>();
	private static List<JobTemp> jts = new ArrayList<JobTemp>();
	
	public static List<JobTemp> getJts() {
		return jts;
	}

	public static void setJts(List<JobTemp> jts) {
		MapsAndLists.jts = jts;
	}
	
	public static void addJts(JobTemp jt){
		jts.add(jt);
	}
	
	public static void addJts(FFListJob jinf,FFCity fcty){
		JobTemp jt = new JobTemp(jinf,fcty);
		jts.add(jt);
	}

	public static void addJob(FFListJob mjob){
		jobs.add(mjob);
	}
	
	public static void removeJob(FFListJob mjob){
		if(jobs.contains(mjob))
			jobs.remove(mjob);
	}
	
	public static List<FFListJob> getJobs() {
		System.out.println("MapJts.size = "+jts.size());
		return jobs;
	}

	public  static void setJobs(List<FFListJob> mjobs) {
		jobs = mjobs;
	}
	
	public static void setJobInfos(List<FFJobInfo> mjobInfos) {
		jobInfos = mjobInfos;
	}
	
	public static void addJobInfo(FFJobInfo mjob){
		jobInfos.add(mjob);
	}
	
	public static void removeJobInfo(FFJobInfo mjob){
		if(jobInfos.contains(mjob))
			jobInfos.remove(mjob);
	}
	
	public  static List<FFJobInfo> getJobInfos() {
		return jobInfos;
	}


}
